package cn.lijida.weiwei.favor.modules.account.service.impl;

import java.util.Date;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import cn.lijida.weiwei.favor.modules.account.entity.FavorAccountDetail;
import cn.lijida.weiwei.favor.modules.account.mapper.FavorAccountDetailMapper;
import cn.lijida.weiwei.favor.modules.account.service.IFavorAccountDetailService;

/**
 * <p>
 * 账簿明细 服务实现类
 * </p>
 *
 * @author jobob
 * @since 2019-12-28
 */
@Service
public class FavorAccountDetailServiceImpl extends ServiceImpl<FavorAccountDetailMapper, FavorAccountDetail> implements IFavorAccountDetailService {

	@Override
	public void create(FavorAccountDetail detail, Long loginId) throws Exception {
		detail.setCreateTime(new Date());
		detail.setMemberId(loginId);
		boolean status = this.save(detail);
		if(!status){
			throw new Exception("添加账簿详情失败");
		}
	}

}
